Always perform Eshell process cleanup runs in the Eshell buffer
authorJim Porter <jporterbugs@gmail.com>
Wed, 26 Jun 2024 04:39:35 +0000 (21:39 -0700)
committerJim Porter <jporterbugs@gmail.com>
Wed, 26 Jun 2024 04:42:28 +0000 (21:42 -0700)
commit1809f6a93efe0ab3ac0f62743c92bd90860ff3ea
treea7aca1f01a07a547e26851b3382a829a13209e8b
parent8b1841021c0d1ca92cb79443909824519429f75f
Always perform Eshell process cleanup runs in the Eshell buffer

Previously, some code executed in a timer, which could execute in the
wrong buffer, leading to a hang.

* lisp/eshell/esh-proc.el (eshell-sentinel): Use 'with-current-buffer'
in the timer function.

* test/lisp/eshell/esh-proc-tests.el (eshell-test-value): New variable.
(esh-proc-test/sentinel/change-buffer): New test.

(cherry picked from commit da4bc5c9274a6705501e24fb8f2984f5bf5fe099)
lisp/eshell/esh-proc.el
test/lisp/eshell/esh-proc-tests.el